// routerConfig.js
import Login from "../pages/login/login.jsx";
import Admin from "../pages/admin/admin.jsx";
import Home from "@/pages/home";
import Goods from "@/pages/goods";
import User from "@/pages/user";
import Roles from "@/pages/roles";
import Pages from "@/pages/goods/pages"
import Category from "@/pages/goods/category"

const RouterConfig = [
  {
    title: "登录",
    key: '/login',
    component: Login
  },
  {
    key: '/',
    component: Admin,
    redirect: '/home',
    routes: [
      {
        title: "首页",
        key: "/home",
        component: Home,
      },
      {
        title: "商品",
        key: "/good",
        component: Goods,
        routes: [
          {
            title: "商品管理",
            key: "/good/page",
            component: Pages
          },
          {
            title: "品类管理",
            key: "/good/category",
            component: Category
          }
        ]
      },
      {
        title: "用户管理",
        key: "/user",
        component: User
      },
      {
        title: "角色管理",
        key: "/roles",
        component: Roles
      }
    ]
  },
]

export default RouterConfig
